/* $Header: 512.h,v 2.2 01/10/02 10:30:11 przybyls Exp $ */

/***********************************************************************/
/* INCLUDE FILE NAME: 512.h                                            */
/* ==================                                                  */
/*                                                                     */
/* Author: Lesley Freed                                                */
/*                                                                     */
/* COMMENT:  This file contains function prototypes for the functions  */
/*           found in the library 512.a.                               */
/*                                                                     */
/*                                                                     */
/*                                                                     */
/***********************************************************************/

#ifndef F512_H
#define F512_H

/*****************************/
/*   EXTERNALS               */
/*****************************/

extern U_INT16 Tick_512_Counter;
extern U_INT16 Monitor_Tick_512_Counter;

/*****************************/
/*   SYMBOLIC CONSTANTS      */
/*****************************/


typedef enum { SIG_RETRY_ATTEMPT,
               SIG_LOST_DATA_IN,
               SIG_LOST_DATA_OUT,
               PNEU_WRITE_CKSUM, 
               PNEU_READ_CKSUM,
               PNEU_ERROR } SOFT_ERROR;


typedef struct {
            unsigned long Sig_Retry;            /* read cksum error */
            unsigned long Sig_Lost_Data_In;     /* retry failed, or dsp reports buffer overrun */
            unsigned long Sig_Lost_Data_Out;    /* transmission of analog info to sig dsp failed */
            unsigned long Pneu_Write_Cksum;     /* pneu dsp reported bad cksum on message from 331 */
            unsigned long Pneu_Read_Cksum;      /* 331 detected checksum error on message from dsp */
            unsigned long Pneu_Error;           /* running log on errant commands from pneu dsp   */

       }  SOFT_ERROR_COUNTS;

extern SOFT_ERROR_COUNTS Soft_Error_Counts;

/*****************************/
/*   MACROS                  */
/*****************************/


/*****************************/
/*   TYPEDEFS                */
/*****************************/


/*****************************/
/*   FUNCTION PROTOTYPES     */
/*****************************/

#pragma SECTION PROG=SysCode

	void	ServiceSigPath(void);
	void	LEDControl(void);

U_INT16 SerialTransfers( );
U_INT16 RetrySigDspRead( void );

void SendBufferToPCB  ( U_INT16 *buffer );
void ReadBufferFromPCB( U_INT16 *buffer );
void SoftError        ( SOFT_ERROR reason );

U_INT16 CheapRead( U_INT16 address );

#pragma SECTION UNDO


#endif
